home *** CD-ROM | disk | FTP | other *** search
- GS 2.52, REVISION 0 FOR THE ATARI ST:
-
- GHOSTSCRIPT OVERVIEW: 11/92
-
- Ghostscript is the GNU project's postscript language interpreter. It
- can be used to convert postscript files into formats suitable for
- non-postscript printers, or to display postscript files on the screen.
- The last Atari version was 2.41 revision 1.
-
- GS 2.52 was compiled with gcc 2.2.2 and mintlibs PL 24. Using the
- mintlibs has apparently eliminated the odd incompatiblilty that
- programs compiled with the ordinary libs have exhibited in the
- past.
-
- Version 2.52 added as standard some functionality which was already
- available in the ST version of 2.41. Because of this, the manner in
- which the user specifies the size of a "band-printing" buffer has
- changed. Another major feature is the ability to select the page size
- from the command line. These changes make gemGS 1.2 somewhat
- incompatible with GS 2.52. You should use gemGS 1.3 with 2.52,
- especially if you want to use the new page-sizing feature.
-
- Here is a brief overview of the remaining atari-specific features:
-
- 1.) The stvdi screen device supports 2, 4, and 8 bit color, although I
- have not yet had enough feedback to determine whether 8-bit color
- works properly on any hardware. The vdi routines are used to
- determine the screen parameters and to copy to the screen, so graphics
- should work on lots of different screen devices. Unfortunately, the
- color driver is very slow, since I implemented in the
- most-obvious-way-to-get-it-to-work tradition. Some bugs in Ghostscript's
- 2 and 4 bit color routines are scheduled to be fixed in 2.6, and at
- that point I will try to implement an assembler image transformation
- algorithm that someone sent me. That may speed things up a bit.
-
- Color mapping has been fixed somewhat since 2.41. GS now searches
- the available palette for the color nearest to the one it wants.
- In 4-color resolutions, the resulting color may not be very close,
- but if you are running GS with windows, you can change the colors
- in the palette (using the control panel) to match the image.
-
- Also, the screen driver should now adjust properly for the aspect
- ratios of different screens.
-
- In Atari 2.41 revision 1, support for windows was added to the screen
- driver. The driver consults the environment variable GS_WIN to
- determine how windows will be handled. If GS_WIN is unset, then no
- windows are used. If GS_WIN=interact, images are printed in windows,
- but text mode is re-entered after each page. This is to ensure that
- the screen will be in the right mode when GS enters interactive mode.
- I know of no way to tell from within GS which page is the last, so I
- have to enter text mode after every page. Finally, if GS_WIN=batch,
- images are printed in windows, but text mode is never entered. This
- mode is useful when it is certain that GS will neither require input
- from stdin nor send output to stdout. Batch mode is used in gemGS, a
- gem shell for Ghostscript. Unfortunately, in batch mode, anything
- written to stderr will obliterate the nice GEM screen. One day I may
- get around to redirecting stdin, stdout, and stderr to a window, but
- it hasn't been done yet.
-
- The window that the image is printed in is a standard GEM window,
- with all of the standard gadgets. Everything operates in the
- normal fashion, except for the arrow buttons in the scroll bars.
- These normally scroll one line, which makes little sense for an
- image. So, I used these buttons for "top of page", "bottom of page",
- etc.
-
- 2.) There are two ways to send output directly to the printer.
- Including '-sOUTPUTFILE=PRN:' on the command line will send output to
- the centronics port via gemdos. The option '-sOUTPUTFILE=CEN:' will
- write output directly to the centronics port. The routines for direct
- printer output were contributed by Chris Strunk (CS-TeX)--THANKS!
- Direct centronics output is generally much faster (about a factor of 4
- for heavy graphics). For some unknown reason, the CEN: option does
- not work properly on some STEs and TTs. This is on my list of problems
- to look at.
-
- 3.) ST-GS no longer recoginzes the nonstandard command line option
- '-c<clist_size>' to specify the size of the buffer for band printing.
- The new option is '-dBufferSize=<clist_size>'. See use.doc. If you
- don't have enough ram to hold the complete bitmap of the image, you
- can specify that the image be constructed in bands of size
- 'clist_size' (in bytes). If the BufferSize option is absent, GS uses
- a default buffer of 100K for images which are larger than the
- available memory.
-
- 4.) Marcus Haebler has written a GEM image device and a 360dpi
- NEC P6 device. THANKS MARKUS!
-
- The number of available drivers has increased to the point that it is
- not feasible to include all that an ST owner might reasonably use.
- The current choice of 20 drivers was decided mostly by a vote of GS
- users on the internet (a couple were included at my whim). Type
- 'gs -h' for a list of the available drivers.
-
- stvdi - The screen device. Supports 1, 2, 4, and 8 bit color,
- slm - Atari SLM laser printer (thanks to Robert Stabl),
- gemimg - GEM bitmap format (thanks to Marcus Haebler),
- djet500 - HP DeskJet 500,
- djet500c - Color HP DeskJet 500,
- laserjet - HP LaserJet,
- bj10e - Cannon BubbleJet,
- epson - Epson 9 and 24 pin printers (limited resolutions),
- eps9high - High resolution Epson 9-pin device (makes multiple passes),
- epsonc - Color epson printers,
- necp6 - NEC 360 dpi printer,
- gifmono - GIF monochrome bitmap format,
- gif8 - GIF 8-bit color format,
- pbmraw - Mono portable bitmap format,
- ppmraw - Color portable bitmap format,
- dfaxhigh - G3 fax format, high res,
- dfaxlow - G3 fax format, low res,
- filter - Filter device,
- dps - Display postscript (partial implementation),
- level2 - Level 2 postscript (partial implementation).
-
- Apparently the display postscript and level 2 postscript are only
- partial implementations. I am not able to test most of these devices,
- so I cannot say how well they work (if at all).
-
- The binary distribution contains the executables, a bunch of postscript
- support files, some relevant docs, and the default Ghostscript font.
- Since the changes to the standard Unix GS source are now trivial, I
- have included the source files specific to the ST in the same archive.
-
- The standard source and fonts for 2.52 (you can use the old fonts if
- you want) are available from prep.ai.mit.edu and its mirror sites, and
- a good number of other sites which carry unix source code.
-
-
- MINIMUM CONFIGURATION:
-
- I run ghostscript on a 4M 520ST with an 85M hard drive and a
- monochrome monitor, so it is hard for me to estimate a minimum
- hardware configuration. The executable is now > 300K, so it is
- unlikely that it will run on a 512K machine. 1M is a tight squeeze,
- but it seems to be possible. Keep in mind that a 300dpi image
- requires a little over 1M of memory, so high resolution printing
- requires either lots of memory or band printing. Color is a real
- memory hog, due to some limitiations of GS, so you may have to
- decrease the resolution for color images (screen images cannot be
- printed in bands).
-
- GS also runs on TT's, although probably not as fast as it would if it
- was compiled specifically for the 68030. I leave it to someone else
- to compile GS for the TT. Compilation is just too damn slow on my ST.
- The stvdi screen device should work in all ST resolutions, TT high, TT
- medium, and perhaps TT low.
-
- You can probably get by without a hard drive if you are willing to use
- only the ghostscript default font. The font files take up about 2-1/4
- Meg of disk space. For graphics, the default font is fine, but text
- will be ugly.
-
-
- INSTALLATION:
-
- Ghostscript searches a default path '.,f:\gs,f:\gs\ps,f:\gs\fonts' for
- the initialization files and the fonts. To change this, define the
- environment variable GS_LIB to be a COMMA separated path for
- ghostscript to search. If you specify file paths on the command line,
- you may use either '/' or '\' as a path separator.
-
- To install:
-
- 1) Copy gs252b.zoo to the desired directory (f:\gs to use the default
- search path).
-
- 2) Unpack the archive with 'zoo e// gs252.zoo'
- If you want the gs directory to be somewhere besides f:\gs,
- define the environment variable GS_LIB to be a comma
- separated search path which contains the files in the
- 'ps' and 'fonts' directories.
-
- USAGE:
-
- To use ghostscript:
-
- 1) Type 'gs -r<width>x<height> file.ps' on the command line. Width
- and height are normally in pixels, but for the screen device
- they are interpreted as DPI. If the height is omitted, the
- argument to -r will be used for both the width and height.
- The default device is the screen at 80 dpi. You can specify
- as much resolution as you have memory for, but it may take forever
- to construct your image.
-
- Wait a while for the image to appear on the screen (this can be
- a long while for complicated files or high resolutions). You can
- use the cursor keys to scroll around the image. Press the <help>
- key for more info on the screen driver. Type <Q> to return to the
- GS interpreter. Then you can type PostScript commands to your
- heart's content. Type 'quit' or <^D> to exit GS.
-
- If the environment GS_WIN is set to one of the values mentioned
- above, then the image will be displayed in a GEM window. In this
- case, you can move around the image with the scroll bars or the
- cursor keys. Look in the "About Stvdi" menu entry for a summary
- of available operations.
-
- 2) To get a printer device, type 'gs -sDEVICE=deskjet file.ps' for a
- deskjet, 'gs -sDEVICE=epson file.ps', etc. Type gs -h for a
- list of available printer devices. I defined an alias for the
- one that I use, i.e. "alias gsdj 'gs -sDEVICE=deskjet' " The
- printer output will be written in a file called 'gs_pr.XXX',
- where XXX is a unique number. See the docs for other ways to
- select a device or to see which devices are installed. Output
- can be redirected to a file of your choosing, or to the printer
- with the '-sOutputFile=' option. The option
- '-sOutputFile="|lpr"' will pipe GS output to lpr running under
- MiNT. OutputFile=PRN: or CEN: will send output directly to
- the printer port (CEN: prints faster, but is less compatible).
-
- 3) Send the file 'gs_pr.XXX' to the printer. Since it is a binary
- graphics file, you will need a print utility which does
- NOT try to add carriage returns and such at ends of lines.
- I wrote a small program to print these files, called 'bpr'.
- It was intended for a DeskJet, but it apparently works
- reasonably well with other printers. Bpr is available from
- lifshitz.ph.utexas.
-
- KNOWN BUGS, LIMITATIONS and POSSIBLE PROBLEMS:
-
- See the doc files and gs252.bugs for some known bugs and problems.
- 8-bit color may not work properly.
-
- TIPS:
-
- Here are a few miscellaneous tips.
-
- 1) Read the supplied documentation! There isn't much, but it is helpful
- and it is quicker than sending me questions. Use.doc is the
- most important file for casual users.
-
- 2) You can change the ghostscript prompt by editing the gs_init.ps file.
- Search the file for GS or >, and then change this to whatever you
- want the prompt to be. Many other changes can be made in this
- file to alter the behavior of GS. For example, you can redefine
- the 'showpage' command so that it doesn't wait around for a
- CR to be typed after every page.
-
- 3) There is a Unix newsgroup called gnu.ghostscript.bug, which you
- may want to have a look at--also comp.languages.postscript.
-
- 4) The ps directory contains some files on which to test ghostscript.
- These are some of the files that where used to test the port.
- Don't run escher.ps at 300 (or 360) dpi unless you have lots
- of time to waste.
-
- 5) GS can be used to view or print the output of dvips. The combination
- of TeX, dvips, and GS can be used to preview TeX documents (or
- PS output from word processors) on the screen at high resolution
- (if you need this sort of thing and have the memory). I have gone
- up to 300dpi and it seems to work OK. Dvips also allows PS
- graphics to be easily included in TeX documents.
-
- 6) There is now a graphical interface to GS, called gemGS. You may
- find it useful if you hate typing command lines. Also, gemGS
- allows the selection of individual pages from large documents,
- although this feature is rather slow. GemGS 1.2 is compatible
- with GS 2.41, and gemGS 1.3 is intended for GS 2.52.
-
- ACKNOWLEDGMENTS:
-
- Many kind people have contributed to the Atari version of Ghostscript.
- Some of the more direct contributions are:
-
- Hauke Hess: Original screen driver upon which stvdi is based,
- Robert Stabl: The Atari SLM driver,
- Chris Strunk: Contributed code for direct centronics printing,
- Marcus Haebler: 360 dpi NEC P6 and GEM image drivers,
- J. Bammi: For gcc, and numerous library bug fixes.
-
- Please forgive me if I forgot to mention an important contribution.
-
-
- FOR MORE INFO:
-
- The original source files, docs, and fonts can be obtained from
- many places. I obtained the ones I used from 'ftp.uu.net'.
-
- Send bug reports to:
-
- Tim Gallivan
- Center for Relativity
- University of Texas
- Austin, TX
- timg@landau.ph.utexas.edu
-